 function Report( object ) {
               
                this.status = null;
                this.userID;
                this.currentObject = object;
       
 
                this.getXMLHttpRequest = function(){
                         
                        var request;
                       
                try{
                    request= new XMLHttpRequest();
                }catch(err1){
                    try{
                        request = new ActiveXObject('Msxml2.XMLHTTP');
                    }catch(err2){
                        try{
                                request = new ActiveXObject('Microsoft.XMLHTTP');
                        }catch(err3){
                                request = false;
                        }
                    }
                }
                $.extend(request, { targetObject: null });
                return request;
            }
   
   
            this.processResponse = function(){
                if(this.readyState==4){
                    if(this.status==200){
                        this.targetObject.html(this.responseText);
                    };
                }
            }
   
   
            this.search = function(){
               
                var r = this.getXMLHttpRequest();
               
                this.status = $('#res');
                
                var whatSearch =$('#whatSearch').val();
                var searcher = $('#searcher').val();
                var userId = $('#userId').val();
                r.open("GET", "SearchServlet?whatSearch="+whatSearch+"&searcher="+searcher + "&userId="+userId, true);    
                r.targetObject = this.status;
                r.onreadystatechange = this.processResponse;
                r.send(null);
               
            }
           
           
        }